package com.ctgu.computer.mapper;

import com.ctgu.computer.domain.po.ChargingPosition;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface MapMapper {

    @Insert("insert into charging_pile_position (longitude, latitude) VALUE (#{longitude},#{latitude})")
    void insertCharging(ChargingPosition chargingPosition);

    @Delete("delete from charging_pile_position where id=#{id}")
    void deleteChargingPoint(Integer id);

    @Update("update charging_pile_position set status = 1-status where id=#{id}")
    void update(Integer id);

    @Select("select * from charging_pile_position")
    List<ChargingPosition> selectAll();
}
